<div class="panel-body">
    <div class="table-container">
        <table class="table table-hover" id="main-table">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>企业名称</th>
                    <th>企业法人</th>
                    <th>企业地址</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <%for (var i = 0; i < data.length; i++) {%>
                <tr>
                    <td><%=(current-1)*10+i+1%></td>
                    <td><%=data[i]["name"]%></td>
                    <td><%=data[i]["people"]%></td>
                    <td><%=data[i]["address"]%></td>
                    <td><button class="btn btn-default view-com">查看</button></td>
                </tr>
                <%}%>
            </tbody>
        </table>
    </div>
    <div style="text-align:center">
        <ul id="pagination" class="pagination">
            <li <%var current_ = current; if (current == 1) {%>class="disabled"<%}%>><a data-url="<%=current-1%>" href="#">&laquo;</a></li>
            <li><a href="#" data-url="<%=1%>">首页</a></li>
            <% if (current != 1) {%>
            <li class="disabled"><a href="#">...</a></li>
            <% } %>
            <li class="active"><a href="#" data-url="<%=current%>"><%=current%></a></li>
            <%
            var end = current+3;
            for (current = current+1; current < end && current <= total; current++) {%>
            <li><a data-url="<%=current%>" href="#"><%=current%></a></li>
            <%}%>
            <% if (current < total) {%>
            <li class="disabled"><a href="#">...</a></li>
            <% } %>
            <li><a href="#" data-url="<%=total%>">尾页(<%=total%>)</a></li>
            <li <% if (end == total+3) {%>class="disabled"<%}%>><a data-url="<%=current_+1%>" href="#">&raquo;</a></li>
        </ul>
    </div>
</div>